/*
 * @Author: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @Date: 2022-09-12 19:13:54
 * @LastEditors: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @LastEditTime: 2022-09-13 09:18:23
 * @FilePath: \郭招娣\app\src\utils\common.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export const filterRouter = (routes, author) => {
    const res = routes.filter(item => {
        
        return item.meta.author.indexOf(author) !== -1
    })
    console.log(res, 'ggg')
    res.length && res.forEach(item => {
        if (item.children) {
            item.children = filterRouter(item.children, author);
        }
    })

    return res;
}
